package com.cxt.vo;

import com.cxt.entity.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserLonginVo {
    private User user;
    private String token;

    public  static UserLonginVo fromUserAndToken(User user, String token) {
        UserLonginVo userLonginVo = new UserLonginVo();
        user.setPassword(null);
        userLonginVo.setUser(user);
        userLonginVo.setToken(token);
        return userLonginVo;
    }

}
